var mysql = require('mysql')

var connection = mysql.createConnection({
    host        :'localhost',
    user        :'root',
    password    :'1234',
    port         :'3306',
    database     :'test'
})

connection.connect()

var delsql = 'DELETE FROM ceshi2 where id=1';

connection.query(delsql,function (err,result) {
    if(err){
        console.log('[DELETE ERROR] - ',err.message);
        return;
    }
    console.log('--------------------------DELETE----------------------------');
    console.log('DELETE affectedRows',result.affectedRows);
    console.log('-----------------------------------------------------------------\n\n');
})

connection.end();